package com.kylin.androidlearn1.Presentation;

import android.annotation.TargetApi;
import android.app.Presentation;
import android.content.Context;
import android.content.res.Resources;
import android.os.Build;
import android.os.Bundle;
import android.view.Display;
import android.view.WindowManager;

import com.kylin.androidlearn1.R;

/**
 * Created by kylinhuang on 10/6/16.
 */
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
public class DemoPresentation extends Presentation {

    public DemoPresentation(Context context, Display display) {
        super(context, display);
    }

    /**
     * Sets the preferred display mode id for the presentation.
     */
    public void setPreferredDisplayMode(int modeId) {
        WindowManager.LayoutParams params = getWindow().getAttributes();
        params.preferredDisplayModeId = modeId;
        getWindow().setAttributes(params);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        // Be sure to call the super class.
        super.onCreate(savedInstanceState);

        // Get the resources for the context of the presentation.
        // Notice that we are getting the resources from the context of the presentation.
        Resources r = getContext().getResources();

        // Inflate the layout.
        setContentView(R.layout.presentation_content);

//        final Display display = getDisplay();
//        final int displayId = display.getDisplayId();
////            final int photo = mContents.photo;
//
//        // Show a caption to describe what's going on.
//        TextView text = (TextView) findViewById(R.id.text);

    }
}
